import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
import './permission' // permission
Vue.use(plugins)
//项目配置
import config from "./config.js"
Vue.prototype.$appConfig = config.appConfig

// 接口api
import Api from "./api"
Vue.prototype.$Api = Api

//全局过滤器
import * as filterFun from '@/utils/filterFun.js'
Object.keys(filterFun).forEach(key => {
	Vue.filter(key, filterFun[key])
})

//引入 uView
import uView from '@/uni_modules/uview-ui';
Vue.use(uView);

import Search from "@/components/Search.vue"
Vue.component('Search',Search)

import ProductsList from "@/components/ProductsList.vue"
Vue.component('ProductsList',ProductsList)

import IsShow from "@/components/IsShow.vue"
Vue.component('IsShow', IsShow)

import PrefectureList from "@/components/PrefectureList.vue"
Vue.component('PrefectureList',PrefectureList)

import bottomBtn from "@/components/bottom-btn/bottom-btn.vue"
Vue.component('bottomBtn', bottomBtn)

import Exchange from "@/components/Exchange.vue"
Vue.component('Exchange', Exchange)

import Auth from './utils/wechat';
Vue.prototype.$wechat = Auth;

Vue.config.productionTip = false
Vue.prototype.$store = store

App.mpType = 'app'

const app = new Vue({
  ...App
})

app.$mount()
